package com.yonyou.marketing.app.api.service;

import java.util.List;
import java.util.Map;


import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import org.marketing.common.Response;
import com.yonyou.marketing.app.api.model.TmRegCities;
import com.yonyou.marketing.app.api.model.TmRegulationsThrid;
import com.yonyou.marketing.app.api.model.TmViolationCity;

@FeignClient(name="SERVICE-VIOLATIONINQUIRY")
public interface ViolationInquiryInterface {
	
	/**
	 * 查询指定省 发动机号和车架号
	 */
	@RequestMapping(value="/violationInquiry/api/v1/checkCarReg", method = RequestMethod.GET)
	public Response<List<TmRegCities>> checkCarReg(@RequestParam(value = "registNo") String registNo);
	
	/**
	 * 更新违章车辆信息
	 */
	@RequestMapping(value="/violationInquiry/api/v1/updateCarReg", method = RequestMethod.GET)
	public Response<Map<String, Object>> updateCarReg(@RequestParam(value = "registNo") String registNo
			,@RequestParam(value = "vin") String vin
			,@RequestParam(value = "engine") String engine
			,@RequestParam(value = "userId_") String userId_);
	
	/**
	 * 进入违章页面前调用：校验车主
	 */
	@RequestMapping(value="/violationInquiry/api/v1/checkCar", method = RequestMethod.GET)
	public Response<Map<String, Object>> checkCar(
			@RequestParam(value = "userId_") String userId_);
	
	/**
	 * 违章查询历史
	 */
	@RequestMapping(value="/violationInquiry/api/v1/findHistory", method = RequestMethod.GET)
	public Response<List<TmRegulationsThrid>> findHistory(@RequestParam(value = "userId_") String userId_);
	
	/**
	 * 清空历史
	 */
	@RequestMapping(value="/violationInquiry/api/v1/deleteHistory", method = RequestMethod.GET)
	public Response<Integer> deleteHistory(@RequestParam(value = "userId_") String userId_);
	
	/**
	 * 违章查询简称
	 */
	@RequestMapping(value="/violationInquiry/api/v1/findProvince", method = RequestMethod.GET)
	public Response<List<Map<String,Object>>> findProvince();
	
	////聚合查询以下
	
	/**
	 * 查询指定省 发动机号和车架号
	 */
	@RequestMapping(value="/violationInquiry/api/v1/juhe/engineAndVin", method = RequestMethod.GET)
	public Response<List<TmViolationCity>> engineAndVin(@RequestParam(value = "cityCode") String cityCode);
	
	/**
	 * 更新违章车辆信息
	 */
	@RequestMapping(value="/violationInquiry/api/v1/juhe/violation", method = RequestMethod.GET)
	public Response<Map<String, Object>> violation(@RequestParam(value = "registNo") String registNo
			,@RequestParam(value = "vin") String vin
			,@RequestParam(value = "engine") String engine
			,@RequestParam(value = "city") String city
			,@RequestParam(value = "userId_") String userId_);
	
	/**
	 * 违章查询简称
	 */
	@RequestMapping(value="/violationInquiry/api/v1/juhe/citys", method = RequestMethod.GET)
	public Response<List<Map<String,Object>>> citys();
	
	/**
	 * 进入违章页面前调用：校验车主
	 */
	@RequestMapping(value="/violationInquiry/api/v1/juhe/checkCar", method = RequestMethod.GET)
	public Response<Map<String, Object>> checkCarJH(
			@RequestParam(value = "userId_") String userId_);
	
}
